home *** CD-ROM | disk | FTP | other *** search
- PROGRAM T_EGW_0a;
-
- { PGM FOR DEMONSTRATING THE tBuf123Reader ACCESS OBJECT }
-
- { This programs reads an AutoCAD DXF text file with an access object
- of tBufTextFileReader class and then with one of the
- tBufTextStringFileReader class.
-
- { Pgm. 07/19/95 by John F Herbster for CIS Delphi Object Pascal Lib. }
-
- {-----} USES {---------------------------------------------------------}
- U_EGB_0a in 'U_EGB_0A.PAS',
- SysUtils,
- WinCrt;
-
- VAR
- Scanner: tBuf123RecScanner;
- pRec: pByteArray; LghRec,TypeRec: word;
-
- {=====} BEGIN {========================================================}
-
- Writeln('Using tBuf123RecReader as a tBufferedFileReader');
- { Create an instance of the class which openes the file and allocates
- a buffer. Note that the "Reader" is of the abstract class. }
- Scanner:=tBuf123RecScanner.Create('TEST.WK1',1024,50);
- { As long as LocNextRec function method can find a next record
- keep doing the loop. }
- With Scanner do while LocNextRec(TypeRec,LghRec,pRec) do begin
- WriteLn(TypeRec:5,' ',LghRec:5);
- end;
- { Return the buffer back to the system.}
- Dispose(Scanner,Destroy);
- WriteLn('Finished');
-
- {=====} END. {=========================================================}
-
-